@import './reset.less';

@font-face {
  font-family: 'byn-np';
  // App 需要全路径
  src: url('https://img.dac6.cn/fre/package/fonts/v1.0.0/byn-np-600.ttf')
    format('truetype');
}

.multi-ellipsis(@lines) {
  display: -webkit-box !important;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: @lines;

  /* autoprefixer: ignore next */
  -webkit-box-orient: vertical;
}

.ellipsis() {
  overflow: hidden;
  white-space: nowrap !important;
  text-overflow: ellipsis;
}

// 文本省略号截断
.fan-ellipsis {
  .ellipsis();
}
.fan-multi-ellipsis--l2 {
  .multi-ellipsis(2);
}
.fan-multi-ellipsis--l3 {
  .multi-ellipsis(3);
}

// 文本
.fan-bold {
  font-weight: bold;
}
.fan-mbold {
  font-weight: var(--fan-text-mbold);
}

// flex
.fan-flex {
  display: flex;
  flex-wrap: wrap;
}
.fan-flex-center {
  .fan-flex;
  justify-content: center;
  align-items: center;
}
.fan-flex-col {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
}
.fan-align-center {
  align-items: center;
}
.fan-align-start {
  align-items: flex-start;
}
.fan-align-end {
  align-items: flex-end;
}
.fan-justify-center {
  justify-content: center;
}
.fan-justify-between {
  justify-content: space-between;
}
.fan-justify-end {
  justify-content: flex-end;
}
.fan-flex-1 {
  flex: 1;
  overflow: hidden;
}

// border
.fan-hairline--top,
.fan-hairline--bottom,
.fan-hairline--left,
.fan-hairline--right {
  position: relative;
}
.fan-hairline--top::before,
.fan-hairline--bottom::after {
  content: '';
  height: 1px;
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--fan-border-color);
  transform: scaleY(0.5);
}

.fan-hairline--left::before,
.fan-hairline--right::before {
  content: '';
  width: 1px;
  position: absolute;
  z-index: 1;
  left: 0;
  bottom: 0;
  top: 0;
  background-color: var(--fan-border-color);
  transform: scaleX(0.5);
}

.fan-hairline--right::before {
  left: 100%;
}

.fan-hairline--top::before {
  top: 0;
}
